<template>
  <div class="callback">
    <Tabs :text="text">
      <Search @data="upState"  @easySearch="search"/>
    </Tabs>
    <DeletedSearch v-if="state" :position="position"></DeletedSearch>
    <router-view></router-view>
    <!-- 底部 -->
    <div class="callback-box">
      <div class="callback-bottom">
        <div class="callback-left">
          <DeletedBotton></DeletedBotton>
        </div>
        <div class="callback-right"><Paging></Paging></div>
      </div>
    </div>
  </div>
</template>

<script>
import DeletedBotton from "../components/DeletedBotton.vue";
import Tabs from "../components/Tabs.vue";
import Paging from "../components/Paging.vue";
import Search from "../components/Search.vue";
import DeletedSearch from "../components/DeletedSearch.vue"

import { searchDeletedAxios } from '../http/apis/deletedApi'

export default {
  components: {
    Tabs,
    Paging,
    Search,
    DeletedBotton,
    DeletedSearch
  },
  data() {
    return {
      text: [
        {
          id: "1",
          textName: "已删除列表",
          url: "/callback/deleted",
        },
        {
          id: "2",
          textName: "本日删除",
          url: "/callback/deletedday",
        },
        {
          id: "3",
          textName: "本周删除",
          url: "/callback/deletedweek",
        },
        {
          id: "4",
          textName: "本月删除",
          url: "/callback/deletedmouth",
        },
      ],
      state:false,
      position:[],
    };
  },
  methods: {
    upState(data){
      this.state = !data//状态处理
    },
    search() {
      searchDeletedAxios
    }
  },
};
</script>

<style>
.callback-bottom {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  width: 100vm;
}
.callback-left {
  display: flex;
  align-items: center;
}
/* .callback-right {
} */
</style>